﻿Namespace World

    Public Class GameEnvironment

        Private Regions(0) As World.Region
        Private Camera As Cameras.FirstPerson
        Public RegionID As Integer
        Private G As GraphicsDeviceManager
        Private ContentDir As String

        Public Sub New(Graphics As GraphicsDeviceManager, ContentDirectory As String)
            G = Graphics
            ContentDir = ContentDirectory
        End Sub

        Public Sub Load()

            Regions(0) = New Region(G, ContentDir)
            Regions(0).Load()
        End Sub

        Public Sub Update(ByVal gameTime As GameTime)
            Regions(RegionID).Update(gameTime, Now)
        End Sub

        Public Sub Draw(ByVal gameTime As GameTime, ByRef Device2 As GraphicsDevice, Effect As Effect)

            Dim RS As New RasterizerState
            RS.CullMode = CullMode.CullCounterClockwiseFace
            Device2.RasterizerState = RS
            Regions(RegionID).Draw(gameTime, Device2, Effect)
         End Sub

    End Class

End Namespace